package com.tboss.template.system.dao;

import java.util.HashMap;
import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

import com.tboss.template.system.dto.MapGrpFnDto;
import com.tboss.global.helpers.sqlSession.SqlSessionSupport;

@Repository
public class MappingGroupFunctionDao extends SqlSessionSupport {
	
	@Autowired
	public MappingGroupFunctionDao(@Qualifier("sqlSession") SqlSession sqlSession){
		super(sqlSession);
	}

	@Override
	public String getNameSpace() {
		// TODO Auto-generated method stub
		return "mappingGrpFn";
	}

	public List<MapGrpFnDto> getMappingGrpFnList(MapGrpFnDto dto){
		return super.queryForList("getMappingGrpFnList", dto);
	}
	
	public List<MapGrpFnDto> getNotMappingGrpFnList(String grpId){
		return super.queryForList("getNotMappingGrpFnList", grpId);
	}
	
	public List<HashMap<String, String>> getUsedLowLevelGrpFnList(String cdId){
		return super.queryForList("getUsedLowLevelGrpFnList", cdId);
	}

	public void addMappingGrpFn(MapGrpFnDto items){
		super.queryForObject("addMappingGrpFn", items);
	}
	
	public void delMappingGrpFn(String grpId){
		super.queryForObject("delMappingGrpFn", grpId);
	}
	
}
